package cn.school.dao;

import java.sql.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import cn.school.entity.Student;

public interface StudentDao {
	public int add(Student stu);

	public int deletesByStuId(@Param("id") List l);

	public int updateByStuId(Student st);

	public List<Student> searchBySname(@Param("sname") String sname);

	public List<Student> searchByAge(@Param("age") int age);

	public List<Student> search(@Param("pageno") int pageno, @Param("pagesize") int pagesize);

	public List<Student> searchLimitByMohu(@Param("pageno") int pageno, @Param("pagesize") int pagesize,
			@Param("sname") String sname, @Param("telephone") String telephone, @Param("qq") String qq,
			@Param("enterdatestart") java.util.Date enterdatestart);

	public int countByMohu(@Param("gid") long gid, @Param("name") String name, @Param("tele") String tele,
			@Param("enterdatestart") Date enterdatestart, @Param("enterdateend") Date enterdateend);

	// 获取学生总数量
	public int getTotalCount();

	// 分页获取学生数据
	public List<Student> getPageStudentList(int pageNo, int pageSize);

	public List<Student> getAll();

	public Student getOne(int stuno);

	public int update(Student stu);

	public int deleteByStuId(long stuno);

	public int searchTotal(@Param("sname") String sname, @Param("telephone") String telephone, @Param("qq") String qq,
			@Param("enterdatestart") java.util.Date enterdatestart);

	public int checkTele(String tele);

}
